<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<html lang="zh-CN" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"
      xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/main.css">
    <title>商城</title>
</head>

<body>
<c:if test="${empty user}">
    <div class="top-nav">
        <div class="container clearf">
            <div class="left">
                <a href="${pageContext.request.contextPath}/Index.jsp" class="item">首页</a>
            </div>

            <div class="right">
                <a href="${pageContext.request.contextPath}/Register.jsp" class="item">注册/登录</a>
            </div>
        </div>
    </div>
</c:if>

<c:if test="${not empty user}">
    <div class="top-nav">
        <div class="container clearf">
            <div class="left">
                <a href="${pageContext.request.contextPath}/UserServlet?action=BackToIndex&id=${user.id}" class="item">首页</a>
            </div>

            <div class="right">
                <div class="dropdown item">
                    <a class="item">欢迎您，${user.username}</a>
                    <div class="dropdown-content">
                        <a href="${pageContext.request.contextPath}/UserServlet?action=UserInf&id=${user.id}">个人信息</a>
                        <a href="${pageContext.request.contextPath}/OrdersServlet?action=Orderselect&uid=${user.id}">我的订单</a>
                        <a href="${pageContext.request.contextPath}/CartServlet?action=IntoCart&id=${user.id}">我的购物车</a>
                        <a href="${pageContext.request.contextPath}/CollectionServlet?action=IntoCollection&id=${user.id}">我的收藏夹</a>
                        <a href="${pageContext.request.contextPath}/UserServlet?action=LogOut">退出登录</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</c:if>


<div class="header">
    <div class="container clearf">
        <div class="col-1 logo">商城</div>
        <div class="dropdown">
            <a class="dropbtn">iPhone</a>
            <div class="dropdown-content">
                <a href="#">iPhone X</a>
                <a href="#">iPhone 11</a>
                <a href="#">iPhone 12</a>
            </div>
        </div>
        <div class="dropdown">
            <button class="dropbtn">华为</button>
            <div class="dropdown-content">
                <a href="#">Mate 10</a>
                <a href="#">Mate 20</a>
                <a href="#">Mate 30</a>
            </div>
        </div>
        <div class="dropdown">
            <button class="dropbtn">小米</button>
            <div class="dropdown-content">
                <a href="#">小米 6</a>
                <a href="#">小米 8</a>
                <a href="#">小米 9</a>
            </div>
        </div>
        <div class="dropdown">
            <button class="dropbtn">魅族</button>
            <div class="dropdown-content">
                <a href="#">魅族 16</a>
                <a href="#">魅族 17</a>
                <a href="#">魅族 18</a>
            </div>
        </div>
        <div class="dropdown">
            <button class="dropbtn">OnePlus</button>
            <div class="dropdown-content">
                <a href="#">OnePlus 9R</a>
                <a href="#">Link 2</a>
                <a href="#">Link 3</a>
            </div>
        </div>
        <div class="col-5 search-bar">
            <input type="text">
            <button>搜索</button>
        </div>
    </div>
</div>


<div style="background-color: #eee;">
    <form action="#" name="car" method="post">
        <div class="container clearf">
            <div>收货地址</div>
            <HR align=center width=100% color=#dedede SIZE=1>
            <div class="col-2">姓名XXX</div>
            <div class="col-6">电话XXXXXXXXXXX</div>
            <button class="col-2">修改</button>
            <div style="width: 100%">地址xxxxxxxx</div>
            <HR align=center width=100% color=#dedede SIZE=3>
            <div style="width: 100%">商品清单</div>
            <HR align=center width=100% color=#dedede SIZE=1>
        </div>

        <div class="container clearf">
            <div class="col-1">
                <input name="check" type="checkbox" value="">
            </div>
            <div class="col-5">
                <img src="/static/img/webp.png">
            </div>
            <div class="col-1" style="color: black">￥4999</div>
            <div class="col-1">数量(x1)</div>
            <div class="col-1" style="color: red">￥4999</div>
            <HR align=center width=100% color=#dedede SIZE=1>
        </div>

        <div class="container clearf">
            <HR align=center width=100% color=#dedede SIZE=3>
            <div class="col-7" style="text-align: right">
                共件商品，总计金额
            </div>
            <div class="col-3" style="text-align:right">￥4999</div>
            <div class="col-7" style="text-align:right">运费(包邮)</div>
            <div class="col-3" style="text-align:right;">￥0</div>
            <HR align=center width=100% color=#dedede SIZE=3>


            <div style="float: right">
                <div>支付方式</div>
                <select>
                    <option value="支付宝">支付宝</option>
                    <option value="微信">微信</option>
                    <option value="银行卡">银行卡</option>
                </select>
            </div>
            <HR align=center width=100% color=#dedede SIZE=3>
            <div style="float: right">
                <div class="col-6">应付金额</div>
                <div class="col-4" style="text-align: left">￥4999</div>
            </div>
            <HR align=center width=100% color=#dedede SIZE=3>
            <button style="float: right">提交订单</button>
        </div>
    </form>
</div>


<div class="footer">
    <div class="container clearf">
        <div class="">© 2021 版权所有 粤ICP备11111111号 |隐私政策|用户使用协议|资质证照|知识产权</div>
    </div>
</div>

</body>
</html>
